package com.jh.tools.base;

import java.io.Serializable;
import java.util.Map;

import rx.Observable;

/**
 * 实体父类
 */
public interface BaseEntity {
     class BaseBean implements Serializable {
        public long id;
        public String objectId;
        public static Map<String, String> param;
    }

    interface IListBean {
        Observable getPageAt(int page);

        void setParam(Map<String, String> param);

        Map<String, String> getParam();

        void addParam(String k,String v);
    }

    abstract class ListBean extends BaseBean implements IListBean {
        @Override
        public void setParam(Map<String, String> param) {
            this.param=param;
        }

        @Override
        public Map<String, String> getParam() {
            return this.param;
        }

        @Override
        public void addParam(String k, String v) {
            if (null!=getParam()){
                getParam().put(k, v);
            }
        }
    }
}
